Virtual storage disks can be allocated to virtual machines running on a hypervisor. So that the total capacity of the virtual hard disks is not limited to the capacity of the storage managed by the hypervisor, each hard disk can be logically divided into grains, within only those grains that are being used to store data being allocated space on physical storage media. Herein, a “grain” unit of space allocation in a virtual disk, typically comprising more than one cluster. A “cluster” is the smallest unit of data that can be loaded or stored to storage by an operating system. A grain table is stored on the physical storage for each virtual disk. A typical grain table is an array of offsets that point to individual grains.
To load or store data from or to a grain, one must first read the grain's offset from the grain table and then read data at that offset. However, this requires twice as many costly disk reads as would be required if the data could be read directly. To achieve better performance, a grain table can be kept in memory. However, each grain table can consume megabytes. For a hypervisor managing a large number of virtual disks, holding all grain tables in memory might conflict with the production demands of the virtual machines. Accordingly, what is needed is a more performant approach to managing grain-table data.